/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.delogic.simuladorbancario.model;

import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JTextField;

/**
 *
 * @author julioVanni
 */
public enum Jlimpador {
    
    TEXT_FELD(){
        public void limpar(JComponent componente){
            JTextField t = (JTextField) componente;
            t.setText(null);
            
        }
        
    }, COMBO_BOX(){
        public void limpar(JComponent componente){
            JComboBox cmb = (JComboBox) componente;
            cmb.setSelectedIndex(1);
        }
        
    }, CHECK_BOX(){
        public void limpar(JComponent componente){
            JCheckBox chk = (JCheckBox) componente;
            chk.setSelected(false);
        }
        
    };
    
    public abstract void limpar(JComponent componente);
    
}
